<!--/. NAV TOP  -->
<nav class="navbar-default navbar-side" role="navigation">
<div id="sideNav" href=""><i class="fa fa-caret-right"></i></div>
    <div class="sidebar-collapse">
        <ul class="nav" id="main-menu">
            <li>
                <a class="navClass" id="admin" href="/admin/index"><i class="fa fa-dashboard"></i>个人中心</a>
            </li>
            <li>
                <a class="navClass" id="bookMark" href="/bookMark/index"><i class="fa fa-desktop"></i>书签管理</a>
            </li>
			<li>
                <a class="navClass" id="blog" href="/blog/index"><i class="fa fa-bar-chart-o"></i>博客管理</a>
            </li>
            <li>
                <a class="navClass" id="access" href="/user/index"><i class="fa fa-qrcode"></i>用户管理</a>
            </li>
            <li>
                <a class="navClass" id="technology" href="/technology/index"><i class="fa fa-table"></i>技术管理</a>
            </li>
            <li>
                <a class="navClass" id="project" href="/project/index"><i class="fa fa-edit"></i>项目管理</a>
            </li>
            <li>
                <a class="navClass" id="dynamic" href="/dynamic/index"><i class="fa fa-fw fa-file"></i>生活动态</a>
            </li>
        </ul>

    </div>

</nav>
<script>
	var pathName=window.document.location.pathname;
	window.onload = function(){
		var as = $(".navClass"); //得到所有的a标签进行遍历判断
		for(var i = 0; i<as.length; i++){
			var data = $(as[i]).attr("id");
			if(data){
				if(pathName.indexOf(data) != -1){
					$(as[i]).addClass("active-menu");
				}
			}
		}
	} 
</script>